#include <etcd/Client.hpp>
#include <etcd/Watcher.hpp>
#include "../common/Etcd.hpp"

void delCallback(std::string key, std::string value)
{
    std::cout << key << " " << value << std::endl;
}

void putCallback(std::string key, std::string value)
{
    std::cout << key << " " << value << std::endl;
}

int main()
{
    std::string host = "http://127.0.0.1:2379";
    std::string key = "/service";
    XKL::initLogger("stdout", "", 1);
    XKL::Discovery dis(host, key, putCallback, delCallback);
    getchar();
    return 0;
}